//申请教员
teacherUpd() {
    if(this.token == null) {
        return;
    }
    let obj = {"realName": "郭永超", "idNo": "4128911", "teacherCertificate": "tc.png", "organId": 1};
    this.getClient().postJson("/teacher/upd", JSON.stringify(obj), (data) => {
        console.info('teacherUpd, ');
        //{"code":0,"msg":"操作成功","clsName":null,"data":null}
        //-1, "不存在"
        //-2, "状态错误"
        return true;
    }, (err) => {
        console.error('teacherUpd, ' + err);
        return false;
    }, this.token);
}
//分享课程链接
teacherShareLink() {
    if(this.token == null) {
        return;
    }
    let obj = {"courseId": 1};
    this.getClient().postJson("/teacher/share/link", JSON.stringify(obj), (data) => {
        console.info('teacherShareLink, ');
        //{"code":0,"msg":"操作成功","clsName":"String","data":"04d8459d7a955ed8dc861c075d5d0c22"}
        //-1, "课程不存在"
        //-2, "没有该课程权限"
        return true;
    }, (err) => {
        console.error('teacherShareLink, ' + err);
        return false;
    }, this.token);
}

//提款单-列表
withdrawOrderList() {
    if(this.token == null) {
        return;
    }
    //orderStatus 提现状态：0-审核中；1-未通过；2-待结算；3-已结算；
    //beginTime     new Date("2022-11-01 00:00:00")
    //endTime       new Date("2022-11-03 23:59:00")
    //curPage 页号，从1开始
    let obj = {"curPage":1, "pageSize":20};
    this.getClient().postJson("/withdraw/order/list", JSON.stringify(obj), (data) => {
        console.info('withdrawOrderList, ');
        //{"code":0,"msg":null,"clsName":"DataPageRes<WithdrawOrderRes>","data":{"recordCount":2,"curPage":1,"pageSize":20,"pageNum":1,"itemLst":[{"orderId":2,"userId":2,"amount":40,"payCertificate":null,"auditRemark":null,"orderStatus":3,"createTime":1742089739,"updateTime":1742090568,"userName":"郭永超"},{"orderId":1,"userId":2,"amount":50,"payCertificate":null,"auditRemark":null,"orderStatus":1,"createTime":1742089675,"updateTime":1742089895,"userName":"郭永超"}],"now":null}}
        //-99, "参数错误"
        return true;
    }, (err) => {
        console.error('withdrawOrderList, ' + err);
        return false;
    }, this.token);
}
//提款单-详情
withdrawOrderDetail() {
    if(this.token == null) {
        return;
    }
    this.getClient().getJson("/withdraw/order/detail?orderId=1", (data) => {
        console.info('withdrawOrderDetail, ');
        //{"code":0,"msg":null,"clsName":"WithdrawOrderRes","data":{"orderId":1,"userId":2,"amount":50,"payCertificate":null,"auditRemark":"不符合要求","orderStatus":1,"createTime":1742089675,"updateTime":1742089895,"userName":"郭永超"}}
        //-1, "不存在"
        return true;
    }, (err) => {
        console.error('withdrawOrderDetail, ' + err);
        return false;
    }, this.token);
}
//提款单-添加
withdrawOrderAdd() {
    if(this.token == null) {
        return;
    }
    let obj = {"amount":40};
    this.getClient().postJson("/withdraw/order/add", JSON.stringify(obj), (data) => {
        console.info('withdrawOrderAdd, ');
        //{"code":0,"msg":"操作成功","clsName":null,"data":null}
        //-1, "没有佣金"
        //-2, "佣金不足"
        return true;
    }, (err) => {
        console.error('withdrawOrderAdd, ' + err);
        return false;
    }, this.token);
}

//教员佣金-详情
teacherCommissionDetail() {
    if(this.token == null) {
        return;
    }
    //withdrawalHistory 已提现金额
    //canWithdrawal 可提现金额
    this.getClient().getJson("/teacher/commission/detail", (data) => {
        console.info('teacherCommissionDetail, ');
        //{"code":0,"msg":null,"clsName":"TeacherCommissionRes","data":{"userId":2,"orderNum":1,"totalCommission":120,"withdrawalHistory":40,"canWithdrawal":80,"frozenAmount":0,"createTime":1742045673,"updateTime":1742090403,"userName":"郭永超"}}
        //-1, "不存在"
        return true;
    }, (err) => {
        console.error('teacherCommissionDetail, ' + err);
        return false;
    }, this.token);
}



//订单-点击分项链接下单
orderInfoAddShare() {
    if(this.token == null) {
        return;
    }
    let obj = {"linkCode":"04d8459d7a955ed8dc861c075d5d0c22"};
    this.getClient().postJson("/order/info/addShare", JSON.stringify(obj), (data) => {
        console.info('orderInfoAddShare, ');
        //{"code":0,"msg":null,"clsName":"Long","data":"1"}
        //-1, "课程不存在"
        //-2, "分享链接已过期"
        return true;
    }, (err) => {
        console.error('orderInfoAddShare, ' + err);
        return false;
    }, this.token);
}